﻿using ETModel;
using System.Collections.Generic;

namespace ETHotfix {

    /// <summary>
    /// 存放于观众服务器的观众客户端实体,Parent为AudClientSession
    /// </summary>
	public sealed class AudClient : Entity {
        /// <summary>
        /// 用户自定义对象
        /// </summary>
        public object UserObject { get; set; }
        /// <summary>
        /// 获取用户自定义对象
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        public T GetUserObject<T>() where T : class { return UserObject as T; }

        public override void Dispose() {
            if (this.IsDisposed) {
                return;
            }
            base.Dispose();
            UserObject = null;
        }
    }
}